package services

import (
	"week2/global"
	"week2/internal/models/dao"
)

func CreateUser(user dao.User) error {
	return global.Db.Create(&user).Error
}

func GetUserInfo(mobile string) (user dao.User, err error) {
	err = global.Db.Where("mobile = ?", mobile).First(&user).Error
	return
}
